#ifndef SLIDINGWINDOWP_H
#define SLIDINGWINDOWP_H
#include <QObject>
#include <QPixmap>
#include <QPoint>

class QTimer;
class QLayout;
//class QLabel;
class QPainter;

namespace ExecTerminalImplNS
{
    class SlidingWindowImpl: public QObject
    {
        Q_OBJECT
    public:
        SlidingWindowImpl(QObject * prnt);

        int slideDirection()const { return theSlideDirection; }
        void setSlideDirection(int dir);
        void resetCentralWidget(QWidget * widget);
        QWidget *centralWidget()const { return theCentralWidget; }
        void changeSlidingState();
//        const QLabel * centralWidgetPicture()const { return theWidgetPicture; }
        bool isExpanded()const;
        void drawWidgetPixmap(QPainter * painter);

    signals:
        void slidingFinished();

    protected slots:
        void nextSlideStep();
    
    protected:
        void resetLayout(QLayout * la = 0);
        enum SlideState 
        {
            ShowingSliding,
            HidingSliding,
            NoSliding
        };
        
    protected:
        QPixmap theWidgetPixmap;
        QPoint thePixmapPos;
        int theSlideDirection;
        int theSlideState;
        int theInitParentSize;
        QTimer * theSlideTimer; 
        QWidget * theCentralWidget;
        QWidget * theParentWidget;
//         QLabel * theWidgetPicture;
//         QWidget * theHiddenCentralWidget;
    };
}

#endif
